<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15">
<title>Ejercicio bloque TJ3</title>
<script type='application/javascript'>
function ventanas(d){
	var v=d.value;
for (var i=1;i<=v;i++){
	var conten = "<html><head><title>Ventana inservible</title></head><body><h1>Ventana numero "+i+"</h1></body></html";
	newwindow=window.open();
	newdocument=newwindow.document;
	newdocument.write(conten);
	}
}
</script>
<input type="text" value="3" id="en" />
<input type="button" value="Generar" onClick="ventanas(document.getElementById('en'))"/>
</head>
</html>
